package ru.spb.xmlreshelper.screen.cdt;

import ru.spb.xmlreshelper.domain.CDTRecord;
import ru.spb.xmlreshelper.gui.PanelEvent;

/**
 * @author Nikita.Brazhnikov
 */
public class CDTSelectionEvent extends PanelEvent {


    private final CDTRecord selectedRecord;
    private boolean doubleClick = false;

    public CDTSelectionEvent(String eventName, CDTRecord selectedRecord) {
        super(eventName);
        this.selectedRecord = selectedRecord;
    }

    public CDTSelectionEvent dbClick() {
        doubleClick = true;
        return this;
    }

    public CDTRecord getSelectedRecord() {
        return selectedRecord;
    }

    public boolean isDoubleClick() {
        return doubleClick;
    }
}
